<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysVehicleRateBean.id}"/>
		<f:event type="preRenderView" listener="#{sysVehicleRateBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Vehicle Rate"/>

	<ui:define name="header">
		Sys Vehicle Rate
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysVehicleRateBean.id}">
				Edit existing Sys Vehicle Rate
			</c:when>
			<c:otherwise>
				Create a new Sys Vehicle Rate
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleTypeNo" value="Vehicle Type No:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleTypeNo" value="#{sysVehicleRateBean.sysVehicleRate.vehicleTypeNo}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleTypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleSubtypeNo" value="Vehicle Subtype No:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleSubtypeNo" value="#{sysVehicleRateBean.sysVehicleRate.vehicleSubtypeNo}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleSubtypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleBrandNo" value="Vehicle Brand No:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleBrandNo" value="#{sysVehicleRateBean.sysVehicleRate.vehicleBrandNo}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleBrandNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleColorNo" value="Vehicle Color No:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleColorNo" value="#{sysVehicleRateBean.sysVehicleRate.vehicleColorNo}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleColorNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleModelCode" value="Vehicle Model Code:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleModelCode" maxLength="100" value="#{sysVehicleRateBean.sysVehicleRate.vehicleModelCode}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleModelCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleNumber" value="Vehicle Number:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleNumber" maxLength="50" value="#{sysVehicleRateBean.sysVehicleRate.vehicleNumber}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleNumber" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateVehicleGearTypeNo" value="Vehicle Gear Type No:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateVehicleGearTypeNo" value="#{sysVehicleRateBean.sysVehicleRate.vehicleGearTypeNo}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateVehicleGearTypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateSalePrice" value="Sale Price:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateSalePrice" maxLength="50" value="#{sysVehicleRateBean.sysVehicleRate.salePrice}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateSalePrice" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateDetail" value="Detail:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateDetail" value="#{sysVehicleRateBean.sysVehicleRate.detail}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateDetail" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateOver" value="Over:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateOver" value="#{sysVehicleRateBean.sysVehicleRate.over}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateOver" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateLoanAllowRatePerc" value="Loan Allow Rate Perc:"/>
				<h:panelGroup>
					<h:inputText id="sysVehicleRateBeanSysVehicleRateLoanAllowRatePerc" value="#{sysVehicleRateBean.sysVehicleRate.loanAllowRatePerc}"/>
					<h:message for="sysVehicleRateBeanSysVehicleRateLoanAllowRatePerc" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateSysVehicleRateDetails" value="Sys Vehicle Rate Details:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysVehicleRateBean.sysVehicleRate.sysVehicleRateDetails}"/>
					<h:dataTable id="sysVehicleRateBeanSysVehicleRateSysVehicleRateDetails" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rate Val"/>
							</f:facet>
							<h:link outcome="/form/sysVehicleRateDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRateVal" value="#{_item.rateVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysVehicleRateDetailBeanAddRateVal" value="#{sysVehicleRateDetailBean.add.rateVal}"/>
								<h:message for="sysVehicleRateDetailBeanAddRateVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysVehicleRateDetailBean.added)}" id="sysVehicleRateBeanSysVehicleRateSysVehicleRateDetailsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysVehicleRateDetailBean.add.sysVehicleRate}" value="#{sysVehicleRateBean.sysVehicleRate}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysVehicleRateBeanSysVehicleRateSysVehicleRateTmpDetails" value="Sys Vehicle Rate Tmp Details:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysVehicleRateBean.sysVehicleRate.sysVehicleRateTmpDetails}"/>
					<h:dataTable id="sysVehicleRateBeanSysVehicleRateSysVehicleRateTmpDetails" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rate Val"/>
							</f:facet>
							<h:link outcome="/form/sysVehicleRateTmpDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRateVal" value="#{_item.rateVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysVehicleRateTmpDetailBeanAddRateVal" value="#{sysVehicleRateTmpDetailBean.add.rateVal}"/>
								<h:message for="sysVehicleRateTmpDetailBeanAddRateVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysVehicleRateTmpDetailBean.added)}" id="sysVehicleRateBeanSysVehicleRateSysVehicleRateTmpDetailsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysVehicleRateTmpDetailBean.add.sysVehicleRate}" value="#{sysVehicleRateBean.sysVehicleRate}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysVehicleRateBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysVehicleRateBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysVehicleRateBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysVehicleRateBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>